import { defHttp } from '/@/utils/http/axios';
import { ContentTypeEnum } from '/@/enums/httpEnum';

enum Api {
  projectpage = '/admin-api/system/project/page',
  projectcreate = '/admin-api/system/project/create',
  projectUpdate = '/admin-api/system/project/update',
  projectDelete = '/admin-api/system/project/delete',
  projectGet = '/admin-api/system/project/get',
  projectTop = '/admin-api/system/project/isTop',
  projectDisable = "/admin-api/system/project/disabled"
}
enum UApi {
  usergrouplistall = '/admin-api/bpm/user-group/list-all-simple',
}
/**
 * @description: 项目
 */
export const projectpage = (params?: any) => {
  return defHttp.get<any>({ url: Api.projectpage, params });
};
export const projectGet = (params?: any) => {
  return defHttp.get<any>({ url: Api.projectGet, params });
};
export const projectcreate = (params?: any) => {
  return defHttp.post<any>({ url: Api.projectcreate, params });
};
export const projectUpdate = (params?: any) => {
  return defHttp.put<any>({ url: Api.projectUpdate, params });
};
export const projectDelete = (params: any) => {
  return defHttp.delete<any>({
    url: Api.projectDelete,
    params,
    headers: { 'Content-Type': ContentTypeEnum.FORM_URLENCODED },
  });
};
export const projectDisable = (params: any) => {
  return defHttp.get<any>({
    url: Api.projectDisable,
    params,
    headers: { 'Content-Type': ContentTypeEnum.FORM_URLENCODED },
  });
};
export const projectTop = (params?: any) => {
  return defHttp.put<any>({ url: Api.projectTop, params, headers: { 'Content-Type': ContentTypeEnum.FORM_URLENCODED }, });
};
/**
 * @description: 用户组
 */
export const usergrouplistall = (params?: any) => {
  return defHttp.get<any>({ url: UApi.usergrouplistall, params });
};
